#ifndef SIGNALINFO_H
#define SIGNALINFO_H

#include <biosignal/sourcesignalposition.h>
#include <biosignal/eeg/eegstdpos.h>

#include <string>
#include <tr1/memory>


namespace biosignal {

using std::string;


class SourceSignalType {
public:
	SourceSignalType();
	virtual ~SourceSignalType();
	string type() const {return m_type;}
	virtual const Position& get_std_position(string label) const = 0;
protected:
	string m_type;

};

#include <biosignal/eeg/eegstdpos.h>
class EEGSignalType : public SourceSignalType {
public:
	EEGSignalType() { m_type = "EEG";}
	virtual const Position& get_std_position(string label) const {
		eeg::EEGStdPos eegpos = eeg::EEGStdPos::Instance();
		const Position& pos = eegpos.get_std_position(label);
		return pos;
	}

};


class SourceSignal
{
public:
	typedef std::tr1::shared_ptr< SourceSignal > SourceSignal_sptr;
	typedef std::tr1::weak_ptr< SourceSignal > SourceSignal_wptr;
	SourceSignal();
	SourceSignal(string label, string transducer_type="",
			string physical_dimension="", string filter_information="");
	virtual ~SourceSignal();

	string label() const;
	void label( string label );

	string transducer_type() const;
	string physical_dimension() const;
	string filter_information() const;
	double sample_rate() const;
	bool enabled() const;

	const Position& position() const;
	const SourceSignalType* type() const;
	void position(const Position& position);
	void type(SourceSignalType* type);
protected:
	string m_label;
	string m_transducer_type;
	string m_physical_dimension;
	string m_filter_information;
	double m_sample_frequency;
	bool m_enabled;
	SourceSignalType* m_signal_type;
	Position m_position;
};

}

#endif // SIGNALINFO_H
